<div class="post">
    <div class="entry">
        <div class="test">
            <?php   $session_data_csv_file = $this->session->userdata('upload_file_name');
                    $test_id=$session_data_csv_file['file_name'];
                    foreach($query_ques2 as $rows_ques){
                    $id=$rows_ques->id_question;
                    $id_back=$rows_ques->id_question-1;
                    $id_next=$rows_ques->id_question+1;
                    $sql="SELECT * FROM qsubmit where id_question='$id' and id_te='$id_mk' and test_id='$test_id'";
                    $query20=$this->db->query($sql);?>
            <div id="q_question">
                <h3><?=$rows_ques->id_question?>></h3><h2>&nbsp<?=$rows_ques->qw?></h2>
            </div>
            </br>
            <div id="q_answer">
                <?php if($id==$max_ques)
                            {?>
                            <form action="<?php echo base_url().'maker/submit_f1/'.$id?>" method="post" onclick="submit">
                            <?php }
                            else
                            {?>
                <form action="<?php echo base_url().'maker/sub_ques_f1/'.$id_next;?>" method="post" onclick="next">
                            <?php }?>
                <table>
                    <tr>
                        <input type="hidden" name="txtID" value="<?=$id_next-1?>">
                    </tr>
                    <tr>
                    <td><input type="text" name="text2" size="40" <?php foreach($query20->result() as $rows20)
                    {
                        $sub_an_array=  explode(",", $rows20->sub_an);?> value="<?php 
                    echo $sub_an_array[0];}?>"/></td>
                    </tr>
                    <tr>
                    <td><input type="text" name="text3" size="40" 
                               <?php foreach($query20->result() as $rows20)
                    {
                        $sub_an_array=  explode(",", $rows20->sub_an);?> value="<?php 
                    echo $sub_an_array[1];}?>"/></td>
                    </tr>
                    <tr>
                    <td><input type="text" name="text4" size="40" 
                               <?php foreach($query20->result() as $rows20)
                    {
                        $sub_an_array=  explode(",", $rows20->sub_an);?> value="<?php 
                    echo $sub_an_array[2];}?>"/></td>
                    </tr>
                    <tr>
                    <td><input type="text" name="text5" size="40" 
                               <?php foreach($query20->result() as $rows20)
                    {
                        $sub_an_array=  explode(",", $rows20->sub_an);?> value="<?php 
                    echo $sub_an_array[3];}?>"/></td>
                    </tr>
                    <tr>
                    <td><input type="text" name="text6" size="40" 
                               <?php foreach($query20->result() as $rows20)
                    {
                        $sub_an_array=  explode(",", $rows20->sub_an);?> value="<?php 
                    echo $sub_an_array[4];}?>"/></td>
                    </tr>
                    <tr>
                    <td><input type="text" name="text7" size="40" 
                               <?php foreach($query20->result() as $rows20)
                    {
                        $sub_an_array=  explode(",", $rows20->sub_an);?> value="<?php 
                    echo $sub_an_array[5];}?>"/></td>
                    </tr>
                    <tr>
                    <td><input type="text" name="text8" size="40" 
                               <?php foreach($query20->result() as $rows20)
                    {
                        $sub_an_array=  explode(",", $rows20->sub_an);?> value="<?php 
                    echo $sub_an_array[6];}?>"/></td>
                    </tr>
                    <tr>
                    <td><input type="text" name="text9" size="40" 
                               <?php foreach($query20->result() as $rows20)
                    {
                        $sub_an_array=  explode(",", $rows20->sub_an);?> value="<?php 
                    echo $sub_an_array[7];}?>"/></td>
                    </tr>
                    <tr>
                    <td><input type="text" name="text10" size="40" 
                               <?php foreach($query20->result() as $rows20)
                    {
                        $sub_an_array=  explode(",", $rows20->sub_an);?> value="<?php 
                    echo $sub_an_array[8];}?>"/></td>
                    </tr>
                    <tr>
                    <td><input type="text" name="text11" size="40" 
                               <?php foreach($query20->result() as $rows20)
                    {
                        $sub_an_array=  explode(",", $rows20->sub_an);?> value="<?php 
                    echo $sub_an_array[9];}?>"/></td>
                    </tr>
                    <tr>
                        <td align="left">
                            <?php 
                            if($rows_ques->id_question>1)
                            {
                            $titleBack = '<img src ="'.base_url().'public/frontend/images/back.jpg" width=70 height=50 />';
                            $back = anchor("maker/back_ques_f1/$id_back",$titleBack);
                            echo $back;
                            }
                            ?>
                            
                        </td>
                        <td align="right">
                            <?php if($id==$max_ques)
                            {?>
                                <input type="image" name="submit" src="<?php echo base_url();?>public/frontend/images/submit.png" width="70" height="50"    >
                            <?php }
                            else
                            {
                            ?>
                            <input type="image" name="next" src="<?php echo base_url();?>public/frontend/images/next.jpg" width="70" height="50"    >
                            <?php }?>
                        </td>
                    </tr>
                </table>
                </form>
            </div>
            <div>
                
            </div>
            <?php }?>
        </div>
    </div>
</div>
